package com.example.execption;
/**
 * 异常如果继承RuntimeException，那么是非检查性异常，不用try-catch，所以我们这样做
 */
public class TijianException extends RuntimeException{

    private Integer code;
    private String message;

    public TijianException()
    {
    }
    public TijianException(TijianExceptionEnum exceptionEnum)
    {
        this.code=exceptionEnum.getCode();
        this.message=exceptionEnum.getMessage();
    }
    public TijianException(Integer code, String message) {
        super();
        this.code = code;
        this.message = message;
    }

    public Integer getCode() {
        return code;
    }
    public void setCode(Integer code) {
        this.code = code;
    }
    public String getMessage() {
        return message;
    }
    public void setMessage(String message) {
        this.message = message;
    }
}